package com.ibm.cloud.banking.ldc;

import com.alipay.sofa.rpc.ldc.LdcProviderManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

/**
 * 注册单元化
 * @author cmk
 * @date 2022/8/5
 */
@Component
public class LdcRouterProviderRegister implements InitializingBean {
    public static final Logger logger = LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
    @Override
    public void afterPropertiesSet() throws Exception {
        logger.info("全局注册单元化---------------------------------");
        LdcProviderManager.getInstance().registeLdcRouteProvider(new PocLdcRouterProvider());
    }
}
